package com.huawei.appmarket.service.settings.view.activity;

import android.os.Bundle;
import android.view.MenuItem;
import com.huawei.appgallery.foundation.ui.framework.activity.BaseActivity;
import com.huawei.appmarket.service.settings.view.widget.VerticalRadioView;
import com.huawei.appmarket.service.settings.view.widget.VerticalRadioViewGroup;
import o.der.a;
import o.der.d;
import o.der.f;
import o.der.g;
import o.Logger;
import o.egs;
import o.ehg;

public class OrderDownloadActivity extends BaseActivity {
    private VerticalRadioView ˊॱ;
    private VerticalRadioView ˋॱ;
    private VerticalRadioViewGroup ˏॱ;
    private VerticalRadioView ͺ;
    ehg ॱˊ = new ehg(this) {
        final /* synthetic */ OrderDownloadActivity ॱ;

        {
            this.ॱ = r1;
        }

        public void ॱ(VerticalRadioViewGroup verticalRadioViewGroup, int i) {
            int i2 = 1;
            if (verticalRadioViewGroup.ˏ() != i) {
                Logger.e("OrderDownloadActivity", "group.getCheckedRadioButtonId() != checkedId");
                return;
            }
            if (this.ॱ.ͺ.ˊ().getId() == i) {
                i2 = 0;
            } else if (this.ॱ.ˋॱ.ˊ().getId() == i) {
                i2 = 2;
            } else if (this.ॱ.ˊॱ.ˊ().getId() != i) {
                Logger.e("OrderDownloadActivity", "checkedId is invalid, checkedId=" + i);
            }
            egs.ॱ().ˊ(i2);
        }
    };

    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        getWindow().setBackgroundDrawableResource(a.ᐝ);
        setContentView(g.ॱʼ);
        ᐝ();
        ॱ(getApplicationContext().getString(f.ˋˈ));
    }

    public boolean onOptionsItemSelected(MenuItem menuItem) {
        if (menuItem.getItemId() != 16908332) {
            return super.onOptionsItemSelected(menuItem);
        }
        finish();
        return true;
    }

    private void ᐝ() {
        this.ˏॱ = (VerticalRadioViewGroup) findViewById(d.ꓸॱ);
        this.ͺ = (VerticalRadioView) findViewById(d.ʹॱ);
        this.ˋॱ = (VerticalRadioView) findViewById(d.ʻʻ);
        this.ˊॱ = (VerticalRadioView) findViewById(d.ﾞॱ);
        this.ˊॱ.setDividerVisibility(8);
        ॱ(egs.ॱ().ˏ());
        this.ˏॱ.setOnCheckedChangeListener(this.ॱˊ);
    }

    private void ॱ(int i) {
        switch (i) {
            case 0:
                this.ˏॱ.ˎ(this.ͺ.ˊ().getId());
                return;
            case 1:
                this.ˏॱ.ˎ(this.ˊॱ.ˊ().getId());
                return;
            case 2:
                this.ˏॱ.ˎ(this.ˋॱ.ˊ().getId());
                return;
            default:
                Logger.ˋ("OrderDownloadActivity", "Invalid mobile data download status:" + i);
                this.ˏॱ.ˎ(this.ˊॱ.ˊ().getId());
                return;
        }
    }
}
